package com.riant.annotation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@Constraint(validatedBy = MyConstrainValidator.class)
public @interface MyConstraint {
    int min() default 0;
    int max() default Integer.MAX_VALUE;

    String message() default "{com.riant.annotation.message}";
    Class<?> [] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
